<template>
  <div class="page-warpper">
    <div :class="flex ? 'page-inner-flex-warpper' : 'page-inner-warpper'">
      <slot></slot>
    </div>
  </div>
</template>
<script setup lang="ts">
defineOptions({
  name: 'DwPageWarpper',
});
const props = defineProps({
  flex: {
    type: Boolean,
    default: false,
  },
});
const flex = props.flex;
</script>
<style lang="css" scoped>
.page-warpper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  vertical-align: middle;
  background-color: #e6ecf5;
}

.page-inner-warpper {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  background-color: #fff;
  box-shadow: 5px #fff;
}

.page-inner-flex-warpper {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  display: flex;
  justify-content: space-between;
}
</style>
